-- GENERATED SPELL FOR [Kolkar Stormseer] --


function spell0_9523(pUnit, Event) --@Fling Torch,n/a--
pUnit:FullCastSpellOnTarget(14292,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9523', 1000, 1)
end

function spell1_9523(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9523', 3000, 1)
end

function spell2_9523(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(6535,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9523', 18000, 1)
end

function Sorts_9523(pUnit, Event)
local choix_sorts_9523 = math.random(0, 2)
if choix_sorts_9523 == 0 then
pUnit:RegisterEvent('spell0_9523', 1, 1)
end
if choix_sorts_9523 == 1 then
pUnit:RegisterEvent('spell1_9523', 1, 1)
end
if choix_sorts_9523 == 2 then
pUnit:RegisterEvent('spell2_9523', 1, 1)
end
end

function mob9523_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9523', math.random(1500, 3000), 1)
end

function mob9523_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9523_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9523_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9523, 1, 'mob9523_Action')
RegisterUnitEvent(9523, 2, 'mob9523_Leave')
RegisterUnitEvent(9523, 3, 'mob9523_Kill')
RegisterUnitEvent(9523, 4, 'mob9523_Die')
